blob: 876eab1bb4ee003cf1033e01ffca34e3cb5c3024 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
---
import Page from '../../../../../layouts/Page.astro';
import localeStaticPaths from '../../../../../lib/localeStaticPaths';
import translate from '../../../../../i18n/translate';
import tFurthsettins from '../../../../../i18n/translations/pages/furthsettins';
import type Locale from '../../../../../types/Locale';
import { getLallansIssue } from '../../../../../data/lallans';
import type LallansIssueNumber from '../../../../../types/LallansIssueNumber';
import LallansIssue from '../../../../../components/LallansIssue.astro';
export async function getStaticPaths() {
const lallansIssueNumbers = Object.keys(getLallansIssue) as `${LallansIssueNumber}`[];
return lallansIssueNumbers.flatMap((n) =>
localeStaticPaths.map((p) => ({ ...p, params: { ...p.params, issueNumber: n } }))
);
}
const locale = Astro.params.locale as Locale;
const t = translate(locale);
const issueNumber = new Number(Astro.params.issueNumber).valueOf() as LallansIssueNumber;
const issue = await getLallansIssue[issueNumber]();
---
<Page locale={locale} title={t(tFurthsettins, { key: 'title' })}>
<LallansIssue issue={issue} locale={locale} />
</Page>
|